# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=libjaylink
pkgver=0.2.0
pkgrel=0
pkgdesc="C library to access SEGGER J-Link and other compatible devices"
url="https://gitlab.zapb.de/libjaylink/libjaylink"
arch="all"
license="GPL-2.0-or-later"
makedepends="automake autoconf libtool libusb-dev"
subpackages="$pkgname-dev"
source="https://gitlab.zapb.de/libjaylink/libjaylink/-/archive/$pkgver/libjaylink-$pkgver.tar.gz"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
576523ba49fc2246ed3e9e111840107aeb5c8b1e7fe3c452c7c4226040ed9241d88ffa31654269256638a035018b2b84fba5dd40f8722facfd6673360fc17b30  libjaylink-0.2.0.tar.gz
"
